SftTree/OCX 7.0

SftTree.CalcCellFromPos Method

Softel vdm, Inc.

Returns the item index and column number for given coordinates.

Syntax       

VB.NET

Boolean = object.CalcCellFromPos(ByVal xPos As Single, ByVal yPos As Single, ByRef ItemIndex As Integer, ByRef ColIndex As Short)  As Boolean

VB

Boolean = object.CalcCellFromPos(ByVal xPos As Single, ByVal yPos As Single, ItemIndex As Long, ColIndex As Integer)  As Boolean

C#.NET

bool Boolean = object.CalcCellFromPos(float xPos, float yPos, out int ItemIndex, out short ColIndex);

VC++

VARIANT_BOOL Boolean = object->CalcCellFromPos(float xPos, float yPos, long* ItemIndex, short* ColIndex);

C

HRESULT object->raw_CalcCellFromPos(float xPos, float yPos, long* ItemIndex, short* ColIndex, VARIANT_BOOL* Boolean);

Delphi

Boolean := object.CalcCellFromPos(xPos : Single; yPos : Single; out ItemIndex : Integer; out ColIndex : Smallint)   : WordBool;

object

A SftTree object.

xPos

The horizontal position relative to the top, left corner of the tree control.  The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

yPos

The vertical position relative to the top, left corner of the tree control.  The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

ItemIndex

Returns the item index at the specified coordinates xPos, yPos.

ColIndex

Returns the column number at the specified coordinates xPos, yPos.

Boolean

Boolean

Description

True

A cell was located at the specified coordinates xPos, yPos.

False

No cell was located at the specified coordinates xPos, yPos.

Comments

Returns the item index and column number for given coordinates.

The CalcCellFromPos and CalcCellFromPosPix methods are synonyms, but may use different coordinate systems.

If cell merging is allowed, CalcCellFromPos will return the actually displayed cell at the given location.  The column number returned does not necessarily match the physical column.  If the actual column is required, use CalcColumnFromPos instead.  CalcIndexFromPos can be used to calculate the index of the item.

See Also  SftTree Object | Object Hierarchy


Feedback / comments / error reports for this topic
© 2015 - Softel vdm, Inc. - www.softelvdm.com